UNPKG

react-garden

Version:

React + TypeScript + ThreeJS app using Material UI on NextJS, Apollo Client, GraphQL + WordPress REST APIs, for ThreeD web development.. a part of the threed.ai code family.

34 lines (26 loc) 627 B
// ** Third Party Imports import axios from 'axios' // ** Demo Components Imports import Edit from '~/views/apps/invoice/edit/Edit' const InvoiceEdit = ({ id }) => { return <Edit id={id} /> } export const getStaticPaths = async () => { const res = await axios.get('/apps/invoice/invoices') const data = await res.data.allData const paths = data.map(item => ({ params: { id: `${item.id}` } })) return { paths, fallback: false } } export const getStaticProps = ({ params }) => { return { props: { id: params?.id } } } export default InvoiceEdit